package com.openbravo.format;

import java.text.ParseException;

public class FormatsValidate extends Formats
{
  private Formats m_fmt;
  private FormatsConstrain[] m_aConstrains;

  public FormatsValidate(Formats paramFormats, FormatsConstrain[] paramArrayOfFormatsConstrain)
  {
    this.m_fmt = paramFormats;
    this.m_aConstrains = paramArrayOfFormatsConstrain;
  }

  public FormatsValidate(Formats paramFormats)
  {
    this(paramFormats, new FormatsConstrain[0]);
  }

  public FormatsValidate(Formats paramFormats, FormatsConstrain paramFormatsConstrain)
  {
    this(paramFormats, new FormatsConstrain[] { paramFormatsConstrain });
  }

  protected String formatValueInt(Object paramObject)
  {
    return this.m_fmt.formatValueInt(paramObject);
  }

  protected Object parseValueInt(String paramString)
    throws ParseException
  {
    Object localObject = this.m_fmt.parseValueInt(paramString);
    for (int i = 0; i < this.m_aConstrains.length; i++)
      localObject = this.m_aConstrains[i].check(localObject);
    return localObject;
  }

  public int getAlignment()
  {
    return this.m_fmt.getAlignment();
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.format.FormatsValidate
 * JD-Core Version:    0.6.0
 */